<h2>Editing <%= @user.name%>'s Profile</h2>
<% @user.password = @user.password_confirmation = nil %>

<% form_for @user do |f| -%>
<%= f.error_messages %>

<p><%= label_tag 'name' %><br/>
<%= f.text_field :name %></p>

<p><%= label_tag 'email' %><br/>
<%= f.text_field :email %></p>

<p><%= label_tag 'Make profile public' %> 
<%= f.check_box :public %></p>

<p><%= label_tag 'password' %><br/>
<%= f.password_field :password %></p>

<p><%= label_tag 'password_confirmation', 'Confirm Password' %><br/>
<%= f.password_field :password_confirmation %></p>

<p><%= submit_tag 'Update' %></p>
<% end -%>

<%= link_to 'Back', user_path(@user) %>
